package com.tcfvic.client.pojos;
// Generated 29/03/2010 9:10:02 PM by Hibernate Tools 3.1.0.beta4

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * Expense generated by hbm2java
 */
@Entity
@Table(name="expense"
    
, uniqueConstraints = {  }
)

public class Expense  implements java.io.Serializable {


    // Fields    

     private ExpenseId id;
     private Person person;
     private Fundingsource fundingsource;
     private String description;
     private Date date;
     private Double amount;
     private String relatedCourse;
     private String units;


    // Constructors

    /** default constructor */
    public Expense() {
    }

	/** minimal constructor */
    public Expense(ExpenseId id, Person person) {
        this.id = id;
        this.person = person;
    }
    
    /** full constructor */
    public Expense(ExpenseId id, Person person, Fundingsource fundingsource, String description, Date date, Double amount, String relatedCourse, String units) {
        this.id = id;
        this.person = person;
        this.fundingsource = fundingsource;
        this.description = description;
        this.date = date;
        this.amount = amount;
        this.relatedCourse = relatedCourse;
        this.units = units;
    }
    

   
    // Property accessors
    @EmbeddedId
    @AttributeOverrides( {
        @AttributeOverride(name="id", column=@Column(name="id", unique=false, nullable=false, insertable=true, updatable=true) ), 
        @AttributeOverride(name="personId", column=@Column(name="Person_id", unique=false, nullable=false, insertable=true, updatable=true) ) } )

    public ExpenseId getId() {
        return this.id;
    }
    
    public void setId(ExpenseId id) {
        this.id = id;
    }
    @ManyToOne(cascade={},
        fetch=FetchType.LAZY)
    
        @JoinColumn(name="Person_id", unique=false, nullable=false, insertable=false, updatable=false)

    public Person getPerson() {
        return this.person;
    }
    
    public void setPerson(Person person) {
        this.person = person;
    }
    @ManyToOne(cascade={},
        fetch=FetchType.LAZY)
    
        @JoinColumn(name="FundingSource_id", unique=false, nullable=true, insertable=true, updatable=true)

    public Fundingsource getFundingsource() {
        return this.fundingsource;
    }
    
    public void setFundingsource(Fundingsource fundingsource) {
        this.fundingsource = fundingsource;
    }
    @Column(name="description", unique=false, nullable=true, insertable=true, updatable=true, length=450)

    public String getDescription() {
        return this.description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    @Column(name="date", unique=false, nullable=true, insertable=true, updatable=true, length=19)

    public Date getDate() {
        return this.date;
    }
    
    public void setDate(Date date) {
        this.date = date;
    }
    @Column(name="amount", unique=false, nullable=true, insertable=true, updatable=true, precision=22, scale=0)

    public Double getAmount() {
        return this.amount;
    }
    
    public void setAmount(Double amount) {
        this.amount = amount;
    }
    @Column(name="relatedCourse", unique=false, nullable=true, insertable=true, updatable=true, length=450)

    public String getRelatedCourse() {
        return this.relatedCourse;
    }
    
    public void setRelatedCourse(String relatedCourse) {
        this.relatedCourse = relatedCourse;
    }
   
    @Column(name="units", unique=false, nullable=true, insertable=true, updatable=true, length=45)

    public String getUnits() {
        return this.units;
    }
    
    public void setUnits(String units) {
        this.units = units;
    }
   








}
